package com.xialing.util;

import org.apache.shardingsphere.core.strategy.keygen.SnowflakeShardingKeyGenerator;

/**
 * @Author: xialing
 * @Description
 */
public class IDUtil {

    private static SnowflakeShardingKeyGenerator snowflakeShardingKeyGenerator = new SnowflakeShardingKeyGenerator();

    /**
     * 生成雪花ID
     * @return
     */
    public static Comparable geneSnowFlakeID() {
        Comparable<?> comparable = snowflakeShardingKeyGenerator.generateKey();
        return comparable;
    }

}
